<!doctype html>
<html>
  <head>
    <script src="js/jquery-1.7.2.js"></script>
    <script type="text/javascript">
      $(function () {
        var name = $('#name');
        var greeting = $('#greeting');

        name.keyup(function () {
          greeting.text('Hello ' + name.val() + '!');
        })
      })
    </script>
  </head>
  <body>
    <input id="name" type="text">
    <h2 id="greeting"></h2>
  </body>
</html>